package javaweb.dao.impl;

import javaweb.dao.OrderItemDao;
import javaweb.pojo.OrderItem;

/**
 * @author shkstart
 * @creat -08-08 23:33
 */
public class OrderItemDaoImpl extends BaseDao implements OrderItemDao {

    @Override
    public int saveOrderItem(OrderItem orderItem) {
        String sql="insert into t_order_item(`name`,`count`,`price`,`total_price`,`order_id`)" +
                "values(?,?,?,?,?)";
        return upDate(sql,orderItem.getOrderId(),orderItem.getName(),orderItem.getCount(),orderItem.getPrice(),orderItem.getTotalPrice(),orderItem.getOrderId());
    }
}
